package atag.apps.mainApp; 
 
import android.app.ListActivity; 
import android.content.Context; 
import android.content.Intent; 
import android.os.Bundle; 
import android.view.View; 
import android.widget.ArrayAdapter; 
import android.widget.ListView; 
 
public class StartupActivity extends ListActivity { 
     /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 
        
        Context c = getBaseContext(); 
        Intent i = new Intent(c, Startup.class); 
        c.startService(i); 
        setListAdapter(new ArrayAdapter<String>(this, 
                	android.R.layout.simple_list_item_1, GUI_TASK_LABELS)); 
        ListView l = getListView(); 
        l.setTextFilterEnabled(true); 
        l.setChoiceMode(ListView.CHOICE_MODE_SINGLE); 
    } 
 
    @Override 
   public void onListItemClick(ListView parent, View v, int position, long id) { 
        Intent intent = new Intent(this, GUI_TASK_CLASSES[position]); 
        startActivity(intent); 
 
} 
 
   static final String[] GUI_TASK_LABELS = new String[] { 
       "Authenticate"
   };
   static final Class[] GUI_TASK_CLASSES = new Class[] {        
       AuthenticateActivity.class
   };
} 
